package com.neuedu.spring.live;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

public class MyAware  implements BeanFactoryAware , ApplicationContextAware, BeanNameAware {


    public void setBeanFactory(BeanFactory beanFactory) throws BeansException {

        System.out.println("获取到全局的 beanFactory "+beanFactory);
    }




    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        System.out.println("全局的 applicationContext "+applicationContext);
    }


    public void setBeanName(String name) {
        System.out.println("Bean的 名字:"+name);
    }
}
